import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SEntityId } from "./SEntityId";
import { SPoint } from "./SPoint";
type int = number;
//class STreasureCollect
    
    export  class STreasureCollect extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new STreasureCollect();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.camp);
            arg1.writeInt(this.itemCode);
            this.entityId.__write(arg1);
            this.bossEntityId.__write(arg1);
            arg1.writeInt(this.bossId);
            arg1.writeInt(this.cellId);
            this.point.__write(arg1);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.camp = arg1.readInt();
            this.itemCode = arg1.readInt();
            this.entityId = new SEntityId();
            this.entityId.__read(arg1);
            this.bossEntityId = new SEntityId();
            this.bossEntityId.__read(arg1);
            this.bossId = arg1.readInt();
            this.cellId = arg1.readInt();
            this.point = new SPoint();
            this.point.__read(arg1);
            return;
        }

        public /* const */_type: int=20538;

        public /* var */camp: int;

        public /* var */itemCode: int;

        public /* var */entityId: SEntityId;

        public /* var */bossEntityId: SEntityId;

        public /* var */bossId: int;

        public /* var */cellId: int;

        public /* var */point: SPoint;

        public static /* var */_regist: STreasureCollect;
    }

            STreasureCollect._regist = new STreasureCollect(true);
        